﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestMediaServerManager
{
    /// <summary>
    /// Simple implementation of ILogger interface.
    ///</summary>
    class BasicLogger : MediaServer.ILogger
    {
        private List<String> Logs = new List<string>();

        public void log(string Message)
        {
            Logs.Add(Message);
        }

        public int GetCount()
        {
            return Logs.Count;
        }

        public String GetLog(int Position)
        {
            if (Position >= 0 && Position < Logs.Count)
            {
                return Logs[Position];
            }
            else
            {
                throw new IndexOutOfRangeException();
            }
        }
    }
}
